// copyTool.js
var time = 0;
function blockAddCopyClickWithIdArr(idArr){
	for (var i = 0; i < idArr.length; i++) {
		var divId = idArr[i];
		$('#'+divId).on('touchstart', function(event){
			event.stopPropagation();
			time = setTimeout(function() {
				setupLongTouchClick(divId);
			}, 500);
		});
		$('#'+divId).on('touchend', function(event) {
			event.stopPropagation();
			clearTimeout(time);
		})
	}
} 
function setupLongTouchClick(divId){
	var paste = api.require('pasteboard');
	var param = { value: $('#'+divId).text() };
	paste.paste(param, function(ret, err) {
	    if (ret.status) {
	        api.toast({
	            msg: '复制成功'
	        });
	    }
	});
}